home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / drdobbs / 1987 / 11 / mem.h < prev    next >
C/C++ Source or Header  |  1987-10-08  |  613b  |  38 lines

  1. /*
  2.     mem.h
  3.     
  4.     definition info for memory management
  5.     
  6.     William May
  7.     
  8.     created:    3/25/87
  9. */
  10.  
  11. #define SYSERR -1
  12.  
  13. /*
  14.  * roundew, truncew - round up or truncate address to the next
  15.  * even word.
  16.  */
  17.  
  18. #define roundew(x)    (int *)((3 + (long)(x)) & (~3))
  19. #define truncew(x)    (int *)(((long)(x)) & (~3))
  20.  
  21. #define DEFSIZE  (150000)    /* default size for a new pool */
  22.  
  23. /*
  24.  * node structure for each node in the free memory list
  25.  */
  26. struct mblock {
  27.     struct mblock *mnext;
  28.     unsigned long mlen;
  29. };
  30.  
  31. /*
  32.  * structure for pools
  33.  */
  34. struct pool {
  35.     struct pool *pnext;
  36.     struct mblock firstblock;
  37. };
  38.